package com.dd.service;

import com.dd.domain.Users;
import com.dd.dao.UsersDao;
import com.dd.tools.DBHelper;
import com.dd.factory.DaoFactory;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class UsersService {
    private DaoFactory factory = null;
    public boolean register(){

        return false;
    }

    public Users login(String parUName, String parUpwd){
        UsersDao usersDao = DaoFactory.getUsersDAO();
        Users users = usersDao.findByUserName(parUName);
        if(users != null){
            if(users.getUpwd().equals(parUpwd)){
                return users;
            }
        }
        return null;
    }

}